#include "Penis.h"

Penis::Penis(Character *parent)
{
	p_parent=parent;
	this->setPosition(p_parent->getPosition());
	m_frameclock=0;
	m_frame=0;
}

void Penis::Update(float dt,AnimationSolver *animator)
{
	this->setPosition(p_parent->getPosition());

	m_frameclock+=dt;
	if (m_frameclock>2)
	{
		m_frameclock=0;
		m_frame++;
		this->setTextureRect(animator->getRect(1,p_parent->getState(),&m_frame,p_parent->getFlipped()));
	}
}
